package com.partner.service;


import java.util.List;

import com.partner.dao.ArticleDao;
import com.partner.domain.ArticleShoucang;
import com.partner.domain.article;
import com.partner.response.TestSkillResponse;

/**
 * 有关考试技巧的service
 * @author Jinshuan
 *
 */
public class ArticleService {
	ArticleDao skillDao = new ArticleDao();
	//分页查询
	public TestSkillResponse selectSkillByPage(int pageSize,int pageNow,String type){
		return skillDao.selectSkillByPage(pageSize, pageNow,type);
		
	}
	// 给文章的收藏表添加一条记录,返回对应的id
		public int insertArticleShoucang(ArticleShoucang articleShoucang) {
			return skillDao.insertArticleShoucang(articleShoucang);
		}
		//给文章删除一条记录
		public boolean deleteArticleShouCang(int id){
			return skillDao.deleteArticleShouCang(id);
		}
		//查询对应用户的所有的文章的收藏记录
		public List<ArticleShoucang> selectArticleShoucangsByUser(String phone){
			return skillDao.selectArticleShoucangsByUser(phone);
		}
		//查询对应用户所收藏的文章或者帖子
		public List<article> selectShouCangArticle(String phone,int pageNow,int pageSize){
			return skillDao.selectShouCangArticle(phone, pageNow, pageSize);
		}
}
